@import '~@/styles/theme.less';
@import '~@/styles/layout.less';
@import '~@/styles/variable.less';
#app {
  .sidebar-container {
    box-sizing: border-box;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    width: @sidebarWidth !important;
    padding: 20px 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: width 0.28s;
    overflow: hidden;
    #color(background-color, --module-bg-color);
    .router-link-active {
      .submenu-title-noDropdown {
        #color(color, --primary-blue-color) !important;
      }
    }
    /deep/.el-scrollbar {
      width: 100%;
      height: 100%;
      .el-scrollbar__wrap {
        overflow-y: auto;
        overflow-x: hidden;
        border: none;
      }
      .el-scrollbar__bar .is-vertical {
        right: 0;
      }
      .is-horizontal {
        display: none;
      }
    }
    /deep/.el-menu {
      border: none;
      height: 100%;
      width: 100%;
      .sidebaritem-container > a {
        width: 100%;
        overflow: hidden;
      }
      .el-menu-item, .el-submenu > .el-submenu__title {
        width: 100%;
        transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
        #color(background-color, --module-bg-color);
        #flex(row, center, flex-start);
        i, span {
          color: inherit;
        }
        i {
          font-size: 16px;
          margin-right: 16px;
        }
        .el-submenu__icon-arrow {
          right: 10px;
        }
        &:hover {
          #color(background-color, --gray-blue-color);
        }
      }
      .nest-menu {
        .el-menu-item, .el-submenu > .el-submenu__title {
          // min-width: @sidebarWidth !important;
          #color(background-color, --primary-bg-color);
          i {
            font-size: 16px;
            #color(color, --primary-text-color);
          }
          &:hover {
            #color(background-color, --gray-blue-color);
          }
        }
      }
    }
  }
  .main-container {
    position: relative;
    margin-left: @sidebarWidth;
    transition: margin-left .28s;
  }
  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
      .tool {
        justify-content: center;
      }
      .el-scrollbar__wrap {
        width: 100%;
      }
    }
    .main-container {
      margin-left: 54px !important;
    }
    .submenu-title-noDropdown {
      padding-left: 15px !important;
      .el-tooltip {
        padding-left: 15px !important;
      }
    }
    .el-submenu {
      overflow: hidden;

      &>.el-submenu__title {
        padding: 0 !important;

        i {
          margin-left: 15px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }
    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }
}
// element-ui 样式
.el-button {
  transition: all 0.5s ease;
}
.el-button--primary {
  #color(border-color, --primary-blue-color);
  #color(background-color, --primary-blue-color);
}
.el-button--primary:hover {
  #color(border-color, --heavier-blue-color);
  #color(background-color, --heavier-blue-color);
}
.el-button--success {
  #color(border-color, --primary-green-color);
  #color(background-color, --primary-green-color);
}
.el-button--success:hover {
  #color(border-color, --heavier-green-color);
  #color(background-color, --heavier-green-color);
}
.el-button--danger {
  #color(border-color, --primary-red-color);
  #color(background-color, --primary-red-color);
}
.el-button--danger:hover {
  #color(border-color, --heavier-red-color);
  #color(background-color, --heavier-red-color);
}
.el-input {
  .el-input__inner {
    #color(border-color, --primary-border-color);
  }
  .el-input__prefix {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
.is-checked,
.is-indeterminate {
  .el-checkbox__input {
    .el-checkbox__inner {
      #color(border-color, --lighter-blue-color);
      #color(background-color, --gray-blue-color);
    }
    .el-checkbox__inner::after {
      #color(border-color, --primary-blue-color);
    }
  }
  .el-checkbox__label {
    #color(color, --primary-blue-color) !important;
  }
}
.is-indeterminate {
  .el-checkbox__inner {
    #color(border-color, --lighter-blue-color) !important;
    #color(background-color, --gray-blue-color) !important;
  }
  .el-checkbox__inner::before,
  .el-checkbox__inner::after {
    #color(border-color, --primary-blue-color);
    #color(background-color, --primary-blue-color);
  }
}
.el-collapse {
  .el-collapse-item {
    .el-collapse-item__header, .el-collapse-item__content {
      #color(color, --primary-text-color);
      #color(background-color, --module-bg-color);
    }
  }
}
.el-tabs {
  .el-tabs__header {
    .el-tabs__nav-wrap {
      .el-tabs__nav-scroll {
        .el-tabs__nav {
          .el-tabs__active-bar {
            #color(background-color, --primary-blue-color);
          }
          .el-tabs__item {
            #color(color, --primary-text-color);
          }
          .is-active {
            #color(color, --primary-blue-color);
          }
        }
      }
    }
  }
}
.el-upload {
  .el-upload-dragger {
    #color(border-color, --primary-border-color);
    #color(background-color, --module-bg-color);
    i {
      #color(color, --gray-blue-color);
    }
    .el-upload__text {
      #color(color, --primary-text-color);
      em {
        #color(color, --lighter-blue-color);
      }
    }
  }
}
.el-table {
  width: 100%;
  .el-table__header-wrapper,
  .el-table__fixed-header-wrapper,
  .el-table__body-wrapper {
    width: 100%;
    #color(border-color, --primary-border-color);
    .el-table__row,
    .el-table__header {
      .el-table__cell {
        #color(color, --primary-text-color);
        #color(border-color, --primary-border-color);
      }
    }
    .el-table-active__row > .el-table__cell{
      color: #FFFFFF;
      #color(background-color, --primary-blue-color) !important;
    }
    .el-table-active__row:hover > .el-table__cell {
      #color(background-color, --heavier-blue-color) !important;
    }
  }
}
.el-menu {
  #color(background-color, --module-bg-color);
  .el-menu-item {
    #color(color, --primary-text-color);
  }
  .el-menu-item:hover {
    #color(background-color, --gray-blue-color);
  }
}
.el-pagination {
  #color(color, --primary-text-color);
  #color(background-color, --module-bg-color);
  .el-pagination__total, .el-pagination__jump {
    #color(color, --primary-text-color);
  }
  .el-pager > li {
    #color(color, --primary-text-color);
    #color(background-color, --module-bg-color);
  }
  .el-pager > .active {
    color: #FFFFFF;
    #color(background-color, --primary-blue-color) !important;
  }
  .btn-prev, .btn-next {
    #color(color, --primary-text-color);
    #color(background-color, --module-bg-color);
  }
}
.el-popover {
  #color(color, --primary-text-color);
  #color(background-color, --module-bg-color);
  
}
.el-dropdown-menu {
  .active {
    color: #FFFFFF;
    #color(background-color, --lighter-blue-color);
  }
}
// 滚动条样式
::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}
::-webkit-scrollbar-thumb {
  border-radius: 20px;
  #color(background-color, --primary-scroll-color);
}
::-webkit-scrollbar-thumb:hover {
  #color(background-color, --hover-scroll-color);
}